package vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@NamedQueries({ 
	@NamedQuery(name = "TopicSource.findAll", query = "select ts from TopicSource ts"),
	@NamedQuery(name = "TopicSource.findByTopicId", query = "select ts from TopicSource ts where topic.id=?")
	})
@Table(name = "topic_source")
public class TopicSource extends BaseEntity {

	@Column(name = "category_name")
	private String catagoryName;

	@JoinColumn(name = "source_id")
	@ManyToOne(fetch = FetchType.LAZY)
	private Source source;

	@JoinColumn(name = "topic_id")
	@ManyToOne(fetch = FetchType.LAZY)
	private Topic topic;
	

	
	public String getCatagoryName() {
		return catagoryName;
	}

	public void setCatagoryName(String catagoryName) {
		this.catagoryName = catagoryName;
	}

	public Source getSource() {
		return source;
	}

	public void setSource(Source source) {
		this.source = source;
	}

	public Topic getTopic() {
		return topic;
	}

	public void setTopic(Topic topic) {
		this.topic = topic;
	}


}
